package com.cloudlibrary.mapper;

import com.cloudlibrary.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;


/**
* @author 33582
* @description 针对表【user】的数据库操作Mapper
* @createDate 2024-12-12 14:23:22
* @Entity com.cloudlibrary.domain.User
*/
@Mapper
public interface UserMapper{
    @Select("select * from user where user_email = #{email} and user_password = #{password} and user_status != 1")
    @Results(id = "userMap",value = {
            @Result(id = true,column = "user_id",property = "id"),
            @Result(column = "user_name",property = "name"),
            @Result(column = "user_password",property = "password"),
            @Result(column = "user_email",property = "email"),
            @Result(column = "user_role",property = "role"),
            @Result(column = "user_status",property = "status")
    })
    User login(User user);
}




